//
//  EMainViewController.m
//  AppRanking
//
//  Created by Gang.Wang on 12-11-9.
//  Copyright (c) 2012年 Gang.Wang. All rights reserved.
//

#import "EMainViewController.h"
#import "EMainView.h"
#import "mcf.h"

@interface EMainViewController ()
{
    EMainView * mainView_;
}

@property (nonatomic, strong) EMainView * mainView;


@end

@implementation EMainViewController

@synthesize mainView = mainView_;

- (void) dealloc
{
    YRelease(mainView_)
    [super dealloc];
}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    
    
    EMainView * temp_mainView = [[EMainView alloc] init];
    
    self.mainView = temp_mainView;
    YRelease(temp_mainView)
    
    [self.view addSubview:self.mainView];
    
    
    [self.mainView setFrame:self.view.bounds];
    
    [self.mainView rotate:self.interfaceOrientation
                 includeSubViews:YES
                       animation:NO];
    
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return YES;
}

@end
